<% remote_form_for :documet_type,
  :update => "home_#{@documet_type.id}",
  :url => documents_show_homes_show_documet_type_url(@documet_type),
  :method => :put,
  :html => {
  :id => "edit_document_form"
} do |f| %>
  <%= f.text_field :name %>
  <%= link_to_function "确定", "$('edit_document_form').onsubmit()", :class => :sanp %>
  <%= link_to_remote "取消",
    :update => "home_#{@documet_type.id}",
    :url => documents_show_homes_show_documet_type_url(:documet_type_id => @documet_type.id),
    :method => :get,
    :html => {
    :class => :sanp
    }
  %>
<% end %>